package com.example.demo.Pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class User {
    //设置TableID自增解决方案,在Table中最好也要勾引选上
    @TableId(type = IdType.ASSIGN_ID)
    private String userId;

    private String userName;

    private String userPassword;

    private String userImgAddress;

    private String userEmail;

    //字段数据插入时间
    @TableField(fill = FieldFill.INSERT)
    private Date userGmtCreate;
    //字段数据修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date userGmtUpdate;
    //版本号类,乐观锁
    @Version
    private Integer userVersion;
    //逻辑删除标识符
    @TableLogic
    private Integer userDeleted;
}